package com.bjesc_b2c.app.appraiset.mvp.presenter.impl;

import android.content.Context;

import com.bjesc_b2c.app.appraiset.mvp.model.BasicInfoModel;
import com.bjesc_b2c.app.appraiset.mvp.model.impl.BasicInfoModelImpl;
import com.bjesc_b2c.app.appraiset.mvp.presenter.BasicInfoPersenter;
import com.bjesc_b2c.app.appraiset.mvp.view.BasicInfoView;

import master_bean.BasicInfoBean;

/**
 * Created by lenovo on 2017/3/1.
 */

public class BasicInfoPersenterImpl implements BasicInfoPersenter, BasicInfoModelImpl.CallBack {
    private BasicInfoView view;
    private BasicInfoModel model;
    public BasicInfoPersenterImpl(BasicInfoView view) {
        this.view = view;
        model = new BasicInfoModelImpl(this);
    }

    @Override
    public void saveBasicInfo(BasicInfoBean bean) {
        model.saveBasicInfo((Context)view, bean);
    }

    @Override
    public void getBasicInfo() {
        model.getBasicInfo((Context)view);
    }

    @Override
    public void callBack(BasicInfoBean bean) {
        view.getBasicInfo(bean);
    }
}
